//
//  ByStoreCollectionWaitVC.m
//  mijifen_ios
//
//  Created by mc on 2017/11/7.
//  Copyright © 2017年 itboye. All rights reserved.
//

#import "ByStoreCollectionWaitVC.h"

// view
#import "ByViewHeaderSuccess.h"

@interface ByStoreCollectionWaitVC ()

@end

@implementation ByStoreCollectionWaitVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"等待确认";
    [self addLeftBackBarButtonItem];
    [self createViews];
    self.view.backgroundColor = BY_TABLE_COLOR;
}

#pragma mark -
- (void)createViews{
    ByViewHeaderSuccess *headerView = [[ByViewHeaderSuccess alloc] initWith:@"StoreCollection_wait" title:@"等待用户确认"];
    [self.view addSubview:headerView];
    __block CGFloat height;
    [headerView mas_makeConstraints:^(MASConstraintMaker *make) {
        if (@available(iOS 11.0,*)) {
            height = (self.view.height - 50 * 2 - 10 - self.view.safeAreaInsets.bottom) / 2;
            make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop);
            make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, height));
        }else{
            height = (self.view.height - 50 * 2 - 10) / 2;
            make.top.equalTo(self.view.mas_top);
            make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, height));
        }
        
    }];
    
    // 消费信息
    UILabel *gongxiLabel = [[UILabel alloc] init];
    [self.view addSubview:gongxiLabel];
    [gongxiLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(headerView.mas_bottom).offset(25);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 40));
    }];
    gongxiLabel.textAlignment = NSTextAlignmentCenter;
    gongxiLabel.textColor = [UIColor lightGrayColor];
    gongxiLabel.font = B_FONT(40);
    gongxiLabel.text = @"消费信息";
    
    // 联系电话
    UILabel *infoLabel = [[UILabel alloc] init];
    [self.view addSubview:infoLabel];
    [infoLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(gongxiLabel.mas_bottom).offset(25);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, 30));
    }];
    infoLabel.font = FONT(18);
    infoLabel.textAlignment = NSTextAlignmentCenter;
    
    // img
    UIImageView *iconImg = [[UIImageView alloc] init];
    [self.view addSubview:iconImg];
    [iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(infoLabel.mas_bottom).offset(25);
        make.left.equalTo(@((SCREEN_WIDTH - 45) / 2));
        make.size.mas_equalTo(CGSizeMake(45, 45));
    }];
    iconImg.image = [UIImage imageNamed:@"StoreCollection_price"];
    
    // alert
    UILabel *alertLabel = [[UILabel alloc] init];
    alertLabel.numberOfLines = 0;
    [self.view addSubview:alertLabel];
    [alertLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(iconImg.mas_bottom).offset(25);
        make.left.equalTo(self.view.mas_left);
        make.right.equalTo(self.view.mas_right);
    }];
    alertLabel.textAlignment = NSTextAlignmentCenter;
    
    // 测试数据
    infoLabel.text = @"13788888888";
    alertLabel.text = @"90元 + 10元积分抵扣";
    
}



@end
